SetClip
SetClip Set clipping region of active GrafPort
#include <Quickdraw.h> Quickdraw
void SetClip(newClipRgn );
RgnHandle newClipRgn ; handle to desired clipping region
SetClip copies the specified region to the current GrafPort's clipRgn. All
drawing on the port will be clipped to this area.
newClipRgn is a handle to a Region, expressed in local coordinates.
Returns: none

Notes: The data describing newClipRgn is copied, so changing the original later
will have no effect. The RgnHandle in GrafPort.clipRgn stays the same, but
the master pointer is changed to point to the duplicated Region structure.
Using the clipping region can simplify many operations. For instance, one
way to draw a half-circle is to set the clipping region to cover half the area
where the circle will be drawn, then draw a full circle. Another example:
set the clipping region to the shape of an oval, then as you draw lines
through the oval, only the pixels inside are affected:
To avoid subsequent redrawing errors, you may want to change the clip
region temporarily:
RgnHandle saveRgn, myRgn;
saveRgn = NewRgn();
GetClip( saveRgn );
SetClip( myRgn ); [TOKEN:12074] or ClipRect( &anyRect ) */
... draw zoom stuff ...
SetClip( saveRgn );
DisposeRgn( saveRgn );
All drawing to a GrafPort is clipped to the intersection of the port's
portBits.bounds, portRect, visRgn, and clipRgn. Initially, the clipRgn of a
GrafPort covers a large rectangle: (-32768,-32768) (32767,32767),
so it has no effect until you set it to a smaller value via this function.
The ClipRect function is a quick way to set the clipping region to a
rectangular area.
The OpenPicture and DrawPicture functions may malfunction unless
you make the clip region smaller than its arbitrarily-large initial setting.